//
//  VerticalDashedLine.swift
//  NyamanDana
//
//  Created by 李永彬 on 2025/10/27.
//

import SwiftUI

struct VerticalDashedLine: View {
    var color: Color = .orange
    var lineWidth: CGFloat = 1
    var dash: [CGFloat] = [3, 3]
    
    var body: some View {
        GeometryReader { geometry in
            Path { path in
                let middleX = geometry.size.width / 2
                path.move(to: CGPoint(x: middleX, y: 0))
                path.addLine(to: CGPoint(x: middleX, y: geometry.size.height))
            }
            .stroke(
                color,
                style: StrokeStyle(
                    lineWidth: lineWidth,
                    dash: dash
                )
            )
        }
    }
}
